// Graphics.h -- graphics interface

/*
   Copyright 2006 Corey Tabaka

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

#include <Color.h>
#include <Image.h>
#include <Rectangle.h>
#include <Common.h>

#ifndef __GRAPHICS_H__
#define __GRAPHICS_H__

namespace gui {
	
	class Graphics {
		public:
		
		virtual ~Graphics(void) {}
		
		virtual RefGraphics create(int x, int y, int w, int h) = 0;
		virtual void fillRect(int x, int y, int w, int h) = 0;
		virtual void setColor(Color color) = 0;
		virtual void setClip(int x, int y, int w, int h) = 0;
		virtual void setClip(const Rectangle &rect) = 0;
		virtual Color getColor(void) = 0;
		virtual void translate(int x, int y) = 0;
		virtual void setOffset(int x, int y) = 0;
		virtual void drawString(const char *str, int x, int y) = 0;
		virtual void drawLine(int x1, int y1, int x2, int y2) = 0;
		virtual void drawImage(const Image &img, int x, int y) = 0;
		virtual void fillImage(const Image &img, int x, int y, int w, int h) = 0;
		virtual void copyImage(const Image &img, int x, int y, int w, int h) = 0;
		
		virtual void drawRect(int x, int y, int w, int h) = 0;
		virtual void drawRect(int x, int y, int w, int h, int radius) = 0;
		virtual void fillRect(int x, int y, int w, int h, int radius) = 0;
		virtual void blurRect(int x, int y, int w, int h, int radius) = 0;
		
		virtual void flush(void) = 0;
	};

} // namespace gui

#endif
